#include <stdio.h>
int main()
{
 int a,foot,inch;
 scanf("%d",&a);
 foot=a/0.3048/100;
 inch=(a/0.3048/100-foot)*12;
 printf("%d %d\n",foot,inch);
 return 0; 
}
